Drainage Pipe
Retaining walls and foundations usually require protection from excessive water buildup in the soil. Use perforated drain pipe to collect soil water, and use solid pipe for runs where you only want to move collected water.
Four-inch, solid and perforated PVC plastic drain pipe is sold in 10-foot lengths. You'll need couplings, elbows, adapters, and Y and T fittings to assemble your system.
Rigid pipe can be snaked out with a sewer auger if it becomes clogged. Flexible drainage pipe eliminates the need for some fittings and is easier to install. Flex is usually sold in 50-foot rolls, though some suppliers may offer 10-foot pieces. Take care not to crush flex while backfilling.